<?php

use yii\helpers\Html;
use frontend\assets\AppAsset;

/**
 * @var \yii\web\View $this
 * @var string $content
 */
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
    <head>
        <meta charset="<?= Yii::$app->charset ?>"/>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title><?= Html::encode($this->title) ?></title>
        <?php $this->head() ?>
    </head>
    <body>
        <?php $this->beginBody() ?>
        <div class="wrapper">
            <div class="box">
                <div class="row">

                    <!-- sidebar -->
                    <div class="column col-xs-3" id="sidebar">
                        <a class="logo" href="#">
                            <img src="<?php echo Yii::getAlias('@web/img/logo/logo.png'); ?>" alt="logo">
                        </a>
                        <ul id="main-menu" class="nav">
                            <li>
                                <?= Html::a('<i class="glyphicon glyphicon-home"></i>&nbsp;&nbsp;Home', ['site/index']) ?>
                            </li>
                            <li class="active">
                                <?= Html::a('<i class="glyphicon glyphicon-bookmark"></i>&nbsp;&nbsp;About', ['site/about']) ?>
                            </li>
                            <li>
                                <?= Html::a('<i class="glyphicon glyphicon-envelope"></i>&nbsp;&nbsp;Contact', ['site/contact']) ?>
                            </li>
                            <?php if (Yii::$app->user->isGuest) : ?>
                                <li>
                                    <?= Html::a('<i class="glyphicon glyphicon-lock"></i>&nbsp;&nbsp;Login', ['site/login']) ?>
                                </li>
                                <li>
                                    <?= Html::a('<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Register', ['site/signup']) ?>
                                </li>
                            <?php else : ?>
                                <li>
                                    <?= Html::a('<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Logout', ['site/logout'], ['data-method' => 'post']) ?>
                                </li>
                            <?php endif; ?>
                        </ul>
                        <ul class="nav hidden-xs" id="sidebar-footer">
                            <li>
                                <a href="http://www.techstorm-solution.com"><h3>TechStorm Solution</h3>&copy; All right reserved.</a>
                            </li>
                        </ul>
                    </div>
                    <!-- /sidebar -->

                    <!-- NavBar Fixed Top -->
                    <nav id="fixed-top-menu" class="navbar navbar-default navbar-fixed-top col-xs-offset-3 col-xs-9">
                        <ul class="nav navbar-nav">
                            <li>
                                <?= Html::a('<i class="glyphicon glyphicon-home"></i>&nbsp;&nbsp;Home', ['site/index']) ?>
                            </li>
                            <li>
                                <?= Html::a('<i class="glyphicon glyphicon-bookmark"></i>&nbsp;&nbsp;About', ['site/about']) ?>
                            </li>
                        </ul>
                        <ul class="nav navbar-nav navbar-right">
                            <?php if (Yii::$app->user->isGuest) : ?>
                                <li>
                                    <?= Html::a('<i class="glyphicon glyphicon-lock"></i>&nbsp;&nbsp;Login', ['site/login']) ?>
                                </li>
                                <li>
                                    <?= Html::a('<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Register', ['site/signup']) ?>
                                </li>
                            <?php else : ?>
                                <li>
                                    <?= Html::a('<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Logout', ['site/logout'], ['data-method' => 'post']) ?>
                                </li>
                            <?php endif; ?>
                        </ul>
                    </nav>
                    <!-- End NavBar Fixed Top -->

                    <!-- main -->
                    <div class="column col-xs-9" style="padding-top: 50px;" id="main">
                        <?= $content ?>
                    </div>
                    <!-- /main -->

                </div>
            </div>
        </div>
        <?php $this->endBody() ?>
    </body>
</html>
<?php $this->endPage() ?>